﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Langben.DAL
{
    [MetadataType(typeof(deviceMetadata))]//使用deviceMetadata对device进行数据验证
    public partial class device : IBaseEntity
    {
      
        #region 自定义属性，即由数据实体扩展的实体
        
        [Display(Name = "contractId")]
        public string contractIdOld { get; set; }
        
        [Display(Name = "thirdProjectId")]
        public string thirdProjectIdOld { get; set; }
        
        [Display(Name = "buyPlanId")]
        public string buyPlanIdOld { get; set; }
        
        [Display(Name = "packageId")]
        public string packageIdOld { get; set; }
        
        #endregion

    }
    public class deviceMetadata
    {
			[ScaffoldColumn(false)]
			[Display(Name = "ID", Order = 1)]
			public object ID { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "deviceName", Order = 2)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object deviceName { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "thirdProjectId", Order = 3)]
			[StringLength(36, ErrorMessage = "长度不可超过36")]
			public object thirdProjectId { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "buyPlanId", Order = 4)]
			[StringLength(36, ErrorMessage = "长度不可超过36")]
			public object buyPlanId { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "packageId", Order = 5)]
			[StringLength(36, ErrorMessage = "长度不可超过36")]
			public object packageId { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "contractId", Order = 6)]
			[StringLength(36, ErrorMessage = "长度不可超过36")]
			public object contractId { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "chargeMan", Order = 7)]
			[StringLength(36, ErrorMessage = "长度不可超过36")]
			public object chargeMan { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "specification", Order = 8)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object specification { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "deviceType", Order = 9)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object deviceType { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "devicePrice", Order = 10)]
			public object devicePrice { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "deviceNum", Order = 11)]
			[Range(0,2147483646, ErrorMessage="数值超出范围")]
			public int? deviceNum { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "deviceMoney", Order = 12)]
			public object deviceMoney { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "deviceCountry", Order = 13)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object deviceCountry { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "deviceUsage", Order = 14)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object deviceUsage { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "devicePlace", Order = 15)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object devicePlace { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "keeper", Order = 16)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object keeper { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "isImport", Order = 17)]
			[StringLength(20, ErrorMessage = "长度不可超过20")]
			public object isImport { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "importReason", Order = 18)]
			[StringLength(2000, ErrorMessage = "长度不可超过2000")]
			public object importReason { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "deviceParameters", Order = 19)]
			[StringLength(36, ErrorMessage = "长度不可超过36")]
			public object deviceParameters { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "kindName", Order = 20)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object kindName { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "deviceState", Order = 21)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object deviceState { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "foreignState", Order = 22)]
			[StringLength(100, ErrorMessage = "长度不可超过100")]
			public object foreignState { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "buyState", Order = 23)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object buyState { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "supplyNotice", Order = 24)]
			[StringLength(2000, ErrorMessage = "长度不可超过2000")]
			public object supplyNotice { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "attachedFile", Order = 25)]
			[StringLength(2000, ErrorMessage = "长度不可超过2000")]
			public object attachedFile { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "checkReport", Order = 26)]
			[StringLength(2000, ErrorMessage = "长度不可超过2000")]
			public object checkReport { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "CreateTime", Order = 27)]
			[DataType(System.ComponentModel.DataAnnotations.DataType.DateTime,ErrorMessage="时间格式不正确")]
			public DateTime? CreateTime { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "CreatePerson", Order = 28)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object CreatePerson { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "UpdateTime", Order = 29)]
			[DataType(System.ComponentModel.DataAnnotations.DataType.DateTime,ErrorMessage="时间格式不正确")]
			public DateTime? UpdateTime { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "UpdatePerson", Order = 30)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object UpdatePerson { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "remark", Order = 31)]
			[StringLength(2000, ErrorMessage = "长度不可超过2000")]
			public object remark { get; set; }


    }


}

